import VueRouter from 'vue-router'

import login from './components/themes/LoginAndRegister/Login.vue'
import register from './components/themes/LoginAndRegister/Register.vue'
import register_success from './components/themes/LoginAndRegister/RegisterSuccess.vue'

import home from './components/themes/Home.vue'

import gallery from './components/themes/Gallery.vue'
import detail from './components/themes/detailContent/Detail.vue'

import post from './components/themes/Post.vue'
import search from './components/themes/Search.vue'

// 3. 创建路由对象
var router = new VueRouter({
  routes: [
    {path:'/', redirect:'/gallery'},
    {path:'/login',component:login},
    {path:'/home',component:home},
    {path:'/register',component:register},
    {path:'/register/success',component:register_success},     
    {path:'/gallery',component:gallery},
    {path:'/gallery/detail',component:detail},
    {path:'/post',component:post},
    {path:'/search',component:search},
  ]
})

// 把路由对象暴露出去
export default router